<?php

namespace app\api\controller\intelligentlive;

use app\api\service\intelligentlive\AccountService;
use think\Request;

class Account
{
    protected $Service;
    public function __construct()
    {
        $this->Service = AccountService::getInstance();
    }

    public function addAccount(Request $request)
    {
        $params = $request->post();
        $result = $this->Service->addAccount($params);
        return writeJson(200,$result,"账号新增完成");
    }

    public function upAccount(Request $request)
    {
        $params = $request->post();
        $result = $this->Service->upAccount($params);
        return writeJson(200,$result,"账号更新完成");
    }

    public function getAccount(Request $request)
    {
        $params = $request->get();
        $result = $this->Service->getAccount($params);
        return writeJson(200,$result,"获取账号成功");
    }
}